{include file="pub:header"/}
<script type="text/javascript" src="/static/admin/js/listTable.js?c=508"></script>
<script type="text/javascript" src="/static/plugin/my97/wdatepicker.js"></script>
<script type="text/javascript">
$(function(){
	$('.J_tablelist').listTable();

    $('.del').click(function(){
        var url=$(this).attr('url');
        ajaxget(url,'是否删除，该操作不可逆!');
    })
});

/*批量删除*/
function editDel(id) {
    if (!id || id.length == 0)return alert("请选择一条记录");

    $('#myform').attr('action', "{:url('delall')}");
    ajaxpost('myform');
}
</script>
</head>
<body>


	<div class="subnav">
		<div class="content_menu ib_a blue line_x">
            <a href="javascript:;"><span class="pagetitle">【附件管理管理】</span></a>
		</div>
	</div>

	<div class="pad_lr_10">

		<form action="{:url('index')}" method="get">

			<table width="100%" cellspacing="0" class="search_form">
			<input type="hidden" name="state" value="{$state}">
				<tbody>
					<tr>
						<td>
							<div class="explain_col">
								名称
								<input name="keyword" type="text" class="input-text" size="30" value="{$keyword}">
                                上传时间 <input type="type" name="starttime" id="d4311" onfocus="WdatePicker({maxDate:'#F{ $dp.$D(\'d4312\')}'})" class="input-text Wdate" value="{$starttime}" size="13px;" readonly> -
                                <input type="type" name="endtime" id="d4312" onfocus="WdatePicker({minDate:'#F{ $dp.$D(\'d4311\')}'})" class="input-text Wdate" value="{$endtime}" size="13px;" readonly>
								<input type="submit" class="btn" value="搜索" />
							</div>
						</td>
					</tr>
				</tbody>
			</table>

		</form>


		<div class="J_tablelist table_list">

			<table width="100%" cellspacing="0">

				<thead>
					<tr>
					    <th width="40"><input type="checkbox" name="checkall" class="J_checkall"></th>
						<th align="left">文件名</th>
						<th align="left">文件类型</th>
						<th align="left">上传时间</th>
						<th align="left">文件大小</th>
						<th>操作</th>
					</tr>
				</thead>

				<form action="" id="myform">
				<input type="hidden" name="state" value="1" id="state">
					<tbody>
						{volist name="list->toArray()['data']" id="vo"}
						<tr>
						    <td align="center"><input type="checkbox" name='id[]' class="J_checkitem" value="{$vo['id']}"></td>
							<td>{$vo['filename']}</td>
							<td>{$vo['filext']}</td>
							<td>{$vo['time']|date="Y-m-d H:i:s"}</td>
                            <td>{:format_bytes($vo['filesize'])}</td>
							<td align="center">
								【<a href="{$vo['path']}" target="_blank" title="点击查看">查看</a>】
								【<a href="javascript:;" class="del" url="{:url('del',['id'=>$vo['id']])}" title="点击删除">删除</a>】
							</td>
						</tr>
						{/volist}

						{empty name="list"}
						<tr>
							<td colspan="9" align="center">暂无数据 !</td>
						</tr>
						{/empty}
					</tbody>
				</form>

			</table>

		</div>


		<div class="btn_wrap_fixed">
		    <label class="select_all mr10"><input type="checkbox" name="checkall" class="J_checkall">全选/取消</label>
            <input type="button" value="批量删除" class="btn" onclick="editDel($.checkBoxValue('id[]'))"/>
			<div id="pages">{$list|raw}</div>
		</div>


{include file="pub:footer" /}
